﻿<UserControl xmlns:my="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.WhistlerBlue" x:Class="eventr.View.ImageDetails"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Util="clr-namespace:eventr.View.Util"
    xmlns:View="clr-namespace:eventr.View"
    Width="Auto" Height="Auto" 
    mc:Ignorable="d" d:DesignWidth="250" d:DesignHeight="350"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
             FontFamily="Arial" >
        
    <UserControl.Resources>
        <Util:StringToUri x:Key="StringToUri"/>
        <Util:AssetPropertyConverter x:Name="AssetPropConverter" />

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,0,0,0">
        <vsm:VisualStateManager.VisualStateGroups>
            <vsm:VisualStateGroup x:Name="DisplayedStates">
                <vsm:VisualStateGroup.Transitions>
                    <vsm:VisualTransition GeneratedDuration="00:00:00.5000000"/>
                </vsm:VisualStateGroup.Transitions>
                <vsm:VisualState x:Name="Displayed">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </vsm:VisualState>
                <vsm:VisualState x:Name="Hidden">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </vsm:VisualState>
            </vsm:VisualStateGroup>
        </vsm:VisualStateManager.VisualStateGroups>

        <my:WhistlerBlueTheme>
            <Border CornerRadius="5" Padding="10,0,10,10" BorderThickness="0" Margin="0,0,0,0" BorderBrush="{x:Null}" Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                <Border.Background>
                    <LinearGradientBrush StartPoint="0.499999,1.27948e-006" EndPoint="0.499999,1">
                        <GradientStop Color="#FFE8E8E9" Offset="0"/>
                        <GradientStop Color="#D7E8E8E9" Offset="0.662582"/>
                        <GradientStop Color="#FFC6C7C9" Offset="0.792828"/>
                        <GradientStop Color="#FFA5A7AA" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
                <StackPanel x:Name="MainPanel" Margin="3,3,3,3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <TextBlock Margin="4,4,4,2" HorizontalAlignment="Center" Foreground="Black" Text="Asset Details" FontSize="16" FontWeight="Bold"/>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Title: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=Title}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Subject: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=Subject}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Author: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=Author}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Category: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=Category}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Audio Codec: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=AudioCodec}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Audio Bit Rate: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=AudioBitRate}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Aspect Ratio: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=VideoDisplayAspectRatio}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Video Codec: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=VideoCodec}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Video Bit Rate: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=VideoBitRate}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Video Frame Rate: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=VideoFrameRate}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Height: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=PictureHeight}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Width: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=PictureWidth}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Size: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=Size}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="Language: " TextWrapping="Wrap"/>
                        <TextBlock Margin="3,5,0,0" FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Properties, Converter={StaticResource AssetPropConverter}, ConverterParameter=AudioLanguage}" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    <StackPanel Margin="0,6,0,10" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Margin="0,5,0,0" FontFamily="Arial" FontSize="12" Foreground="Black" FontWeight="Bold" Text="URL: " TextWrapping="Wrap"/>
                        <HyperlinkButton Foreground="#264984" Margin="3,5,0,0" TargetName="_blank" ToolTipService.ToolTip="{Binding Path=CurrentImageContext.Url}" Content="{Binding Path=CurrentImageContext.Url}" NavigateUri="{Binding Converter={StaticResource StringToUri}, Path=CurrentImageContext.Url}" Height="Auto" HorizontalAlignment="Left" />
                        <!--<HyperlinkButton Margin="3,5,0,0" TargetName="_blank" NavigateUri="{Binding Converter={StaticResource StringToUri}, Path=CurrentImageContext.Url}" Height="Auto" HorizontalAlignment="Stretch" >
                            <HyperlinkButton.Content>
                                <TextBlock FontFamily="Arial" FontSize="12" Foreground="#264984" Text="{Binding Path=CurrentImageContext.Url}" TextWrapping="Wrap" HorizontalAlignment="Stretch"/>
                            </HyperlinkButton.Content>
                        </HyperlinkButton>-->
                    </StackPanel>
                </StackPanel>
            </Border>
        </my:WhistlerBlueTheme>
    </Grid>
    
</UserControl>
